<?php
session_start();
error_reporting(0);
if($_SESSION["msg"]== 1)
{
$login_user=$_SESSION["session_user"];
?>
<p>&nbsp;
<h1>welcome <?php echo $login_user ?> ...</h1>
&nbsp;
</p>
<?php
}
											
mysql_connect("localhost","root","") or die ("sorry..");
mysql_select_db("books");

$qry ="select * from category";
$rs= mysql_query($qry);


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>Online shopping </title>
	<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
	<!--[if lte IE 6]>
		<style type="text/css" media="screen">
			.tabbed { height:420px; }
		</style>
	<![endif]-->
	
	<script src="../js/jquery-1.4.1.min.js" type="text/javascript"></script>
	<script src="../js/jquery.jcarousel.pack.js" type="text/javascript"></script>
	<script src="../js/jquery.slide.js" type="text/javascript"></script>
	<script src="../js/jquery-func.js" type="text/javascript"></script>
    
   <script type="text/javascript">
function showUser(str)
{
if (str=="")
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","items_list.php?q="+str,true);
xmlhttp.send();
}
</script>

<script type="text/javascript" src="../js/highslide-with-html.js"></script>
<link rel="stylesheet" type="text/css" href="../css/highslide.css" />
<script type="text/javascript">

hs.graphicsDir = '../graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';

</script>	
</head>
<body>
<!-- Top -->
<div id="top">
	
  <div class="shell">
		
		<!-- Header -->
		<div id="header">
			
			<div id="navigation">
				<ul>
				    <li><a href="user_home.php">Home</a></li>
					<li><a href="#">Support</a></li>
					<li><a href="#">The Store</a></li>
					<?php if($login_user !=''){ ?><li class="last"><a href="logout.php">Logout</a></li> <?php } ?>
				</ul>
			</div>
		</div>
		<!-- End Header -->
		
		<!-- Slider -->
		<div id="slider">
		  <div id="slider-holder">
            <ul>
              <li><a href="#"><img src="../images/slide1.jpg" alt="" height="210" width="500" /></a></li>
              <li><a href="#"><img src="../images/slide2.jpg" alt=""  height="210" width="500"/></a></li>
              <li><a href="#"><img src="../images/slide3.jpg" alt="" height="210" width="500"/></a></li>
              <li><a href="#"><img src="../images/slide4.jpg" alt="" height="210" width="500" /></a></li>
              <li><a href="#"><img src="../images/slide5.jpg" alt="" height="210" width="500"/></a></li>
              <li><a href="#"><img src="../images/slide6.jpg" alt="" height="210" width="500"/></a></li>
            </ul>
	      </div>
	    <div id="slider-nav">
				<a href="#" class="prev">Previous</a>
				<a href="#" class="next">Next</a>			</div>
	  </div>
	  <!-- End Slider -->
		
	</div>
</div>
<!-- Top -->

<!-- Main -->
<div id="main">
	<div class="shell">
		
		<!-- Search, etc -->
		<div class="options">
			<div class="search">
				<form action="" method="post">
					<span class="field"><input type="text" class="blink" value="SEARCH" title="SEARCH" /></span>
					<input type="text" class="search-submit" value="GO" />
				</form>
			</div>
			<span class="left"><a href="#">Advanced Search</a></span>
			<div class="right">
				<span class="cart">
					<a href="#" class="cart-ico">&nbsp;</a>
					<strong>0.00</strong>
				</span>
				<span class="left more-links">
					<a href="#">Checkout</a>
					<a href="#">Details</a>
				</span>
			</div>
		</div>
		<!-- End Search, etc -->
		
		<!-- Content -->
		<div id="content">
			
			<!-- Tabs -->
			<div class="tabs">
				<ul>
				    <li><a href="#" class="active"><span>Select.... </span></a></li>
				     <li></li>
				   
				</ul>
			</div>
			<!-- Tabs -->
		
			
			<!-- Container -->
			<div id="container">
				
				<div class="tabbed">
					
					<!-- First Tab Content -->
				 
				  <form action="" method="post">
                    <p>&nbsp;</p>
				   <table>
                   <tr>
                   <td>Select The Category : </td>
                    <td><select name="category" id="category" onChange="showUser(this.value)">
                   <option value="#">Select a category</option>
				   <?php
                if($rs)
					 {
					  $i=0;
					 while($rs_data=mysql_fetch_array($rs))
					  {
				?>
                  
                    <option value="<?=$rs_data['categoryid']?>"><?=$rs_data['name']?></option>
                <?php
               		 $i++;
				    }
				 }
				else
					{
					die(" failed..................");
					} 
				?>
                     </select> 
                    </td>
                     </tr>
                     
                    </table>
                    </form>
                  <div id="txtHint">
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                  </div>
				 
				
				<!-- Brands -->
				<div class="brands">
					<h3>Brands</h3>
					<div class="logos">
						<a href="#"><img src="../images/logo1.gif" alt="" height="70" width="110" /></a>
						<a href="#"><img src="../images/logo2.gif" alt="" height="70" width="110"  /></a>
						<a href="#"><img src="../images/logo3.gif" alt=""  height="70" width="110" /></a>
						<a href="#"><img src="../images/logo4.gif" alt="" height="70" width="110" /></a>
					</div>
				</div>
				<!-- End Brands -->
				
				<!-- Footer -->
				<div id="footer">
					<div class="left">
						<a href="#">Home</a>
						<span>|</span>
						<a href="#">Support</a>
						<span>|</span>
						<a href="#">My Account</a>
						<span>|</span>
						<a href="#">The Store</a>
						<span>|</span>
						<a href="#">Contact</a>
					</div>
					<div class="right">
						&copy;  Design by <a href="http://chocotemplates.com" target="_blank" title="CSS Templates"></a>
					</div>
				</div>
				<!-- End Footer -->
				
			</div>
			<!-- End Container -->
			
		</div>
		<!-- End Content -->
		
	</div>
</div>
<!-- End Main -->
	
</body>
</html>